package code5;

import java.util.List;
import java.util.Stack;

public class Code3 {

    public void code(List<Integer> l1, List<Integer> l2, List<Integer> l3, Stack<Integer> list){

        Code4 c4 = new Code4();
        System.out.println("玩家1的牌：");
        c4.code(l1);
        System.out.println("玩家2的牌：");
        c4.code(l2);
        System.out.println("玩家3的牌：");
        c4.code(l3);
        System.out.println("底牌：");
        for(int i=0; i<3; i++){
            int n = list.pop();
            if(i==2){
                if(13==n){
                    System.out.print("K");
                }else if(12==n){
                    System.out.print("Q");
                }else if(11==n){
                    System.out.print("J");
                }else{
                    System.out.print(n+"");
                }
            }else{
                if(13==n){
                    System.out.print("K,");
                }else if(12==n){
                    System.out.print("Q,");
                }else if(11==n){
                    System.out.print("J,");
                }else{
                    System.out.print(n+",");
                }
            }

        }
        System.out.println();
    }
}
